package com.crm.domain.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.time.LocalDateTime;
  
/**
 * @author Xanny
 */
// TODO 需要补充用户登录的ip和时间 表和字段的补充
@Data
@TableName(value = "user",autoResultMap = true)
public class User {

    @TableId(type = IdType.AUTO)
    private Long userId;

    private String userName;  

    private String nickName;  

    private String password;

    private String status;

    private String userType;  

    private String avatar;  

    private String email;  

    private String realName;  

    private String phonenumber;

    private Character sex;  

    private Long deptId;

    private String postNo;

    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;  

    private String createBy;

    private String updateBy;

    private Integer delFlag;  

}